package screen;

import framework.Key;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.KeyEvent;

import framework.Util;
import framework.Screen;
import game.Global;

public class IntroductionScreen extends Screen {
    private Image title;


    public IntroductionScreen() {
        title = Util.loadImage(Global.IMG_GAME_OVER);
        Global.level = 1;
        Global.lifes=100;
    }

    public void paint(Graphics g) {
        g.drawImage(title, 0, 0, null);

    }

    public void update() {

        if (Key.isDown(KeyEvent.VK_D) || Key.isDown(KeyEvent.VK_ENTER)) {
            // iniciar jogo
            Screen.setCurrentScreen(new TitleScreen());
        }else
        if (Key.isDown(KeyEvent.VK_ESCAPE)) {
            // sair do jogo
            System.exit(0);
        }
    }
}
